<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <table border="1 solid" colspa="0" cellspacing="0">
            <tr>
                <th>姓名</th>
                <th>性别</th>
                <th>年龄</th>
                <th>操作</th>
            </tr>
            <!-- 那个元素要循环，就加上v-for -->
            <tr v-for="(item,index) in list" :key="index">
                <td>{{item.name}}</td>
                <td>{{item.sex}}</td>
                <td>{{item.age}}</td>
                <td>
                    <button>修改</button>
                    <button>删除</button>
                </td>
            </tr>
        </table>
    </div>
    <script type="module">
        import {createApp} from "https://unpkg.com/vue@3/dist/vue.esm-browser.js";
        createApp({
            data(){
                return{
                    list:[
                        {name:"张三",sex:"男",age:18},
                        {name:"李四",sex:"女",age:19},
                        {name:"王五",sex:"男",age:20},
                        {name:"赵六飒飒撒旦飞洒",sex:"女",age:21},
                        {name:"孙七",sex:"男",age:22},
                    ]
                }
            }
        }).mount("#app");
    </script>
</body>
</html>